import React from 'react'
import have from '../../../assets/img/have.jpeg'
import no from '../../../assets/img/no.jpeg'
import "./shoplist.less"
export default function ShopList(props) {
    // console.log(props);
    let { shoplist } = props;

    return (
        <div className="shoplist">
            {
                shoplist.map(item => (
                    <div key={item.id}>
                        <div className="shop">
                            <div  className="chekced" >
                                {
                                    true ? <div className="icon"> <img src={no} alt="" /> </div> : <div className="icon"> <img src={have} alt="" /> </div>
                                }
                            </div>
                            <img className="img" src={item.img} alt="" />
                            <div>
                                <span>{item.goodsname}</span><br />
                                <p>￥{item.price}</p><br />
                                <div>
                                    <button>+</button>
                                    <span>{item.num}</span>
                                    <button>-</button>
                                </div>
                            </div>
                        </div>
                    </div>
                ))
            }
            <div>总价：</div>
        </div>
    )
}